﻿@model SILAS.Entidades.Empleado

@{
    ViewBag.Title = "CrearEmpleado";
    Layout = "~/Views/Shared/_LayoutGeneral.cshtml";
}

<h3><b>Registrar Nuevo Empleado</b></h3>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>



@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend><h5><b>Empleado</b></h5></legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.Nombre)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Nombre)
            @Html.ValidationMessageFor(model => model.Nombre)
        </div>

        <div class="editor-label">
            @Html.Label("Apellido Paterno")
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.ApPaterno)
            @Html.ValidationMessageFor(model => model.ApPaterno)
        </div>

        <div class="editor-label">
            @Html.Label("Apellido Materno")
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.ApMaterno)
            @Html.ValidationMessageFor(model => model.ApMaterno)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.DNI)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.DNI)
            @Html.ValidationMessageFor(model => model.DNI)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Area)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Area)
            @Html.ValidationMessageFor(model => model.Area)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Email)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Email)
            @Html.ValidationMessageFor(model => model.Email)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Celular)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Celular)
            @Html.ValidationMessageFor(model => model.Celular)
        </div>

        <div class="editor-label">
            @Html.Label("Cargo")
        </div>
        <div class="editor-field">
            @Html.DropDownList("IdCargo")
            @Html.ValidationMessageFor(model => model.IdCargo)
        </div>
        <br />
        <p>
            <input type="submit" value="Crear" />
        </p>
    </fieldset>
}

<div>
<a href="@Url.Action("ListarEmpleados", "Empleado")">
               <img src="@Url.Content("~/Content/Imagenes/volver.jpg")" title="Volver al Menu" alt="Volver al Menu" />
            </a>
    
</div>
